@extends('admin.layout.main')
@section("content")
<style>
    .vintage {
        color: transparent;
        background-color: black;
        text-shadow: rgba(255, 255, 255, 0.5) 0 5px 6px, rgba(255, 255, 255, 0.2) 1px 3px 3px;
        -webkit-background-clip: text;
    }
    .content{
        padding-left:20px;
    }

</style>
<fieldset class="layui-elem-field layui-field-title" style="margin-top: 20px;">
    <legend>任务详情</legend>
</fieldset>
<div class="content">
    <div class="layui-form-item" >
        <label class="vintage">任务名:&nbsp;&nbsp;&nbsp;{{$task->name}}</label>
    </div>
    <div class="layui-form-item">
    <label class="vintage"  >分类ID:&nbsp;&nbsp;&nbsp;{{$task->type_id}}</label>
    </div>
    <div class="layui-form-item">
    <label class="vintage"  >任务具体内容:&nbsp;&nbsp;&nbsp;{{$task->task_content}}</label>
    </div>
    <div class="layui-form-item">
        <label class="vintage"  >用户ID:&nbsp;&nbsp;&nbsp;<a href="/admin/user/{{$task->user_id}}/setting">{{$task->user_id}}</a></label>
    </div>
    <div class="layui-form-item">
        <label class="vintage"  >起始时间至终点:&nbsp;&nbsp;&nbsp;{{$task->start_time.'到'.$task->end_time}}</label>
    </div>

    <div class="layui-form-item">
        @if($task->task_state==1)
        <label class="vintage"  >状态:正在进行</label>
            @elseif($task->task_state==0)
            <label class="vintage"  >状态:任务失败</label>
            @else
            <label class="vintage"  >状态:任务完成</label>
            @endif
    </div>
    <div class="layui-form-item">
        <label class="vintage"  >创建时间:{{$task->created_at}}</label>
    </div>

</div>
<button class="layui-btn" id="update">进入修改页面</button>
<button class="layui-btn" id="back">返回</button>
    <script>
        $('#update').on('click', function(){
            window.location.href="/admin/task/{{$task->id}}/edit"
        });
        $('#back').on('click', function(){
            history.back();
        });
    </script>
@endsection
